from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
from selenium.webdriver.support.select import Select
from selenium.webdriver.common.keys import Keys
from selenium .webdriver.common.action_chains import ActionChains
# from elenium.webdriver.support.wait import WebDriverWait
# from  selenium.webdriver.support import Expected_conditions as EC

op = webdriver.ChromeOptions()
op.add_experimental_option("excludeSwitches", ["enable-automation"])
op.add_experimental_option("useAutomationExtension", False)
driver = webdriver.Chrome(options = op)

driver.get(r"https://jqueryui.com/slider/#multiple-vertical")
iframe = driver.find_element(By.CSS_SELECTOR,"#content > iframe")
driver.switch_to.frame(iframe)#进入iframe
hx = driver.find_element(By.CSS_SELECTOR,"#master > span")
sleep(1)
ActionChains(driver).drag_and_drop_by_offset(hx,100,0).perform()
sleep(2)
zx = driver.find_element(By.CSS_SELECTOR,"#eq > span:nth-child(1) > span")
sleep(1)
ActionChains(driver).drag_and_drop_by_offset(zx,0,100).perform()
sleep(2)
driver.quit()

